<extend name="Base:common" />
<block name="body">
<link rel="stylesheet" href="__CSS__/go/index3.css" />
<link rel="stylesheet" type="text/css" href="__CSS__/go/LotteryDetail.css"/>
<link rel="stylesheet" type="text/css" href="__CSS__/go/header.css"/>
<div class="Current_nav">
    <a href="{:U('Home/Yungo/index')}">一元云购</a> <span>&gt;</span> 
    <volist name="goodsCat" id="vo">
        <a href="{:U('Home/Yungo/index',array('to'=>3,'c1Id'=>$item['mall_cateid']['catId']))}">{$vo[0]['catName']}</a><span>&gt;</span> 
    </volist>
    揭晓详情
    <div class="m-other fr" id="btnMyCart"><a class="goCartList" href="{:U('Home/Yungo/index',array('to'=>1))}" title="云购清单"><em>云购清单</em><span>{$cartNum}</span></a></div>
</div>
<div class="show_content">
	<!-- 商品期数 -->
<style>
.result-how{
	width:952px !important;
	position:absolute;
	left:-268px;top:270px;
	height:105px;
	border-top:1px solid #f3f3f3;
}
</style>
			
	<div id="divPeriodList" class="show_Period">		
		<ul class="Period_list">
            <volist name="loopqishu" id="vo">
                <if condition="$key eq 0">
                    <li><a href="{:U('Home/Yungo/index',array('to'=>5,'gid'=>$vo['id']))}"><b class="period_Ongoing">第{$vo['qishu']}期<i></i></b></a></li>
                <else />
                    <if condition="$vo['qishu'] eq $item['qishu']">
                        <li><a href="{:U('Home/Yungo/index',array('to'=>5,'gid'=>$vo['id']))}"><b class="period_ArrowCur">第{$vo['qishu']}期</b></a></li>
                    <else />
                        <li><a href="{:U('Home/Yungo/index',array('to'=>5,'gid'=>$vo['id']))}" class="gray02">第{$vo['qishu']}期</a></li>
                    </if>
                </if>
            </volist>	
        </ul>
	</div>
	<!-- 商品信息 -->
<div id="div_ngresult" style="width: 1190px;" class="ng-result-wrapper clearfix  ">
                <!--图片展示-->
                <div class="ng-result-img">
                    <div class="result-img-wrapper">
                            <a href="#" title="{$item['title']}">
							<img alt="{$item['title']}" src="__ROOT__/{$item['thumb']}" height="242" width="242"></a>
                    </div>
                    <!--<a href="http://lyz.***.com/?/goods/93" class="result-more">查看商品详情</a>-->
                </div>
			     <!--揭晓结果-->
                <div class="ng-result-detail" style="height:370px !important;">
                    <div class="result-con-wrapper">
                        <h2 class="title"><span class="num">(第{$item['qishu']}期)</span>{$item['title']}</h2>
                        <p class="price">价值：{$item['money']}</p>
                        <div class="result-main">
                            <div class="result-con-info">
                                <p class="r-name">
                                    <span><a href="#" target="_blank" title="{$item['q_user']['userName']}">{$item['q_user']['userName']}</a></span>
                                </p>
                                <p>总共抢购：<span class="r-num">{$user_shop_number}</span>人次<a id="divOpen" href="javascript:;" class="r-look"></a></p>
                                <p>揭晓时间：<span><PHP> echo str_replace(' ',' ',microt($item['q_end_time']));</PHP></span></p>
                                <p>夺宝时间：<span><?php echo str_replace(' ',' ',microt($user_shop_time));?></span></p>
                                <div class="result-head-pic">
                                	<a rel="nofollow" href="#" target="_blank" style="width:104px;height:104px;border-radius:50%;display:block;">
    									<img src="__ROOT__/{$item['uphoto']}" height="100" width="100">
        								<div class="rh-wrap"></div>
									</a>
                                </div>
                            </div>
                            <div class="result-con-code">
                                <p class="code-name">— 幸运抢购码 —</p>
								<span class="code-num">{$item['q_user_code']}</span>
                            </div>
                        </div>
                        <div class="result-how">
                            <h6>计算结果</h6>
							<div class="gs">
								<span class="count_str" style="width:15px;">
									(
								</span>
								<span class="result-code">
									<p class="p1">{$user_shop_time_add}</p>
									<p>100个时间求和</p>
								</span>
								<span class="count_str">
									+
								</span>
								<span class="result-code">
									<p class="p1">{$item['opencode']}</p>
									<p>"老时时彩"开奖号码</p>
								</span>
								<span class="count_str">
									)%
								</span>
								<span class="result-code">
									<p class="p1">{$item['canyurenshu']}</p>
									<p>该商品总需人次</p>
								</span>
								<span class="count_str">
									+
								</span>
								<span class="result-code">
									<p class="p1">10000001</p>
									<p>原始数</p>
								</span>
								<span class="count_str">
									=
								</span>
								<span class="result-code res">
									<p class="p1">{$item['q_user_code']}</p>
									<p>本期幸运号码</p>
								</span>
							</div>
                        </div>
                    </div>
                </div>
			    <!--查看分期-->
                <!--
                <div class="ng-result-select">
                    <ul class="r-select">
                        <li>
                             <a href="#"><i class="ng-result-bg up transparent-png"></i><span></span></a>
                        </li>
                        <li>
                             <a href="#"><i class="ng-result-bg down transparent-png"></i><span></span></a>
                        </li>
                    </ul>
                </div>
                -->
                <!--清除浮动-->
                <div class="clear"></div>
            </div>


	<!-- 计算结果 所有参与记录 晒单 -->
	<div id="calculate" class="ProductTabNav">
	    <div id="divMidNav" class="DetailsT_Tit">
	        <div class="DetailsT_TitP">		     
                <ul>
			        <li class="Product_DetT DetailsTCur"><span class="DetailsTCur">计算结果</span></li>
			        <li class="All_RecordT"><span class="">所有参与记录</span></li>
			        <!--<li class="Single_ConT"><span class="">晒单</span></li>-->          
		        </ul>
		    </div>
	    </div>
	</div>

	<!--补丁3.1.6_b.0.1-->
	<div id="divCalResult" class="Product_Content">	
		<div class="ygRecord" name="div_tab">
			
				<div class="yghelp">
					<span class="count_rule">幸运号码<br />规则</span>
<p>1、商品的最后一个号码分配完毕后，本网站所有商品的最后100个购买时间记录；</p>
<p>2、将这100个时间的数值进行求和（得出数值A）（每个时间按时、分、秒、毫秒的顺序组合，如10:25:55.362则为102555362）；</p>
<p>3、为保证公平公正公开，系统还会等待一小段时间，取最近下一期中国福利彩票“老时时彩”的开奖结果（一个五位数值B）；</p>
<p>4、（数值A+数值B）除以该商品总需人次得到的余数（例如：33除以6，商数为5，余数为3）+ 原始数 10000001，得到最终幸运号码，拥有该幸运号码者，直接获得该商品；</p>
<p style="color:#DB3652;">注：如遇福彩中心通讯故障，无法获取上述期数的中国福利彩票“老时时彩”开奖结果，且24小时内该期“老时时彩”开奖结果仍未公布，则默认“老时时彩”开奖结果为00000。</p>
										<br>
					<b>由于网站还未满100条购买记录。所以按照   10000001 + (揭晓时间求和结果*100/参与人数) 的余数   即为“幸运云购码”。</b>
									</div>
				
					<div class="RecordOnehundred"><h4> 未满100条计算结果 </h4>
					<div class="ResultBox"><h2>计算结果</h2>
							<p class="num4"><em>1、</em> 求和：
								<span class="Fb">{$user_shop_time_add}</span>(揭晓时间求和结果)<br/>
								<em>2、</em>  第 
								<span class="Fb">{$item['opentime']} 期“老时时彩”开奖号码：
                                <volist name="opencode" id="vo">
                                    <em class="opencode">{$vo}</em>
                                </volist>
                                <a href="http://caipiao.163.com/award/cqssc/20160130.html" target="_blank" style="color:#06f;margin-left:10px;">开奖查询>></a><br/></span>
							<em>3、</em> 取余：
							<span class="Fb">({$user_shop_time_add} + 
                                <volist name="opencode" id="vo">
                                    <em class="opencode">{$vo}</em>
                                </volist>
                            )</span>
							<span class="Fb"> % {$item['canyurenshu']}</span>(本商品总需参与人次)
							<span class="Fb"> = {$user_shop_fmod}</span>(余数)<br>
							<em>4、</em> 结果：<span class="Fb">{$user_shop_fmod}</span>(余数) + <span class="Fb">10000001 = <em> {$item['q_user_code']}</em></span>
							</p>
							<br />
							<b>最终结果：{$item['q_user_code']}</b>
						</div>  
						
				</div>          
								
			</div>
            
        
		<!-- 购买记录20条 -->
		<div name="div_tab" id="bitem" class="AllRecordCon">
			<iframe id="iframea_bitem" g_src="{:U('Home/Yungo/goRecord',array('gid'=>$goods['details']['id']))}" style="width: 2000px; border:none;height:0px;" frameborder="0" scrolling="no"></iframe>		
		</div>	
		<!-- 晒单 -->
		<div name="div_tab" id="divPost" class="Single_Content">
			<iframe id="iframea_divPost" g_src="#" style="width:978px; border:none;height:0px;" frameborder="0" scrolling="no"></iframe>
		</div>
	</div>
<script>
function set_iframe_height(fid,did,height){
	$("#"+fid).css("height",height);
}

$(function(){
var fouli=$(".DetailsT_TitP ul li");
var divCalResult =  $("div[name='div_tab']");
	fouli.click(function(){				
		var index=fouli.index(this);
		fouli.removeClass("DetailsTCur").eq(index).addClass("DetailsTCur");
		var iframe = divCalResult.hide().eq(index).find("iframe");
			if (typeof(iframe.attr("g_src")) != "undefined") {
			  	 iframe.attr("src",iframe.attr("g_src"));
				 iframe.removeAttr("g_src");
			}
			
		divCalResult.hide().eq(index).show();
	});
<!--补丁3.1.6_b.0.3-->
	

	$(".Announced_But").click(function(){
		var next_li = $(".DetailsT_TitP ul>li");
		var index = $(this).index()
		next_li.eq(index).click();
	});

	
	$(window).scroll(function(){
		if($(window).scrollTop()>=941){
			$("#divMidNav").addClass("nav-fixed");
		}else if($(window).scrollTop()<941){
			$("#divMidNav").removeClass("nav-fixed");
		}
	});
});
function divOpen(){
var height=$("#userRnoId").css("height");
	if(height=="90px"){
		$("#userRnoId").css("height","auto");
	}else{
		$("#userRnoId").css("height",90);
	};
}
$(function(){	
	$("#divOpen").click(divOpen);
});
</script>	

<style>.yFootSupport_in dd a{height:30px;line-height:30px;}</style>
<script type="text/javascript">
  function current(){ 
  var d=new Date(),str=''; 
  str +=d.getMonth()+1+'月'; //获取当前月份（0——11） 
  str +=d.getDate()+'日&nbsp;&nbsp;'; 
  str +=d.getHours()+':'; 
  str +=d.getMinutes()+':'; 
  str +=d.getSeconds()+''; 
  return str; } 
  setInterval(function(){$("#nowTime").html(current)},1000); 
</script>
  <style>
  .header-right{float: right;margin-right: 5px;margin-top: 20px;}
  .header-right a{
      display: block;
      width: 130px;text-align: center;
      height: 42px;line-height: 42px;background:#ff4a00;border-radius: 2px;color: #fff;font-size: 20px;
  }
  </style>

 	<!--end右下角揭晓-->
	<script type="text/javascript">
(function(){				
		var week = '日一二三四五六';
		var innerHtml = '{0}:{1}:{2}';
		var dateHtml = "{0}月{1}日 &nbsp;周{2}";
		var timer = 0;
		var beijingTimeZone = 8;				
				function format(str, json){
					return str.replace(/{(\d)}/g, function(a, key) {
						return json[key];
					});
				}				
				function p(s) {
					return s < 10 ? '0' + s : s;
				}			

				function showTime(time){
					var timeOffset = ((-1 * (new Date()).getTimezoneOffset()) - (beijingTimeZone * 60)) * 60000;
					var now = new Date(time - timeOffset);
					document.getElementById('sp_ServerTime').innerHTML = format(innerHtml, [p(now.getHours()), p(now.getMinutes()), p(now.getSeconds())]);				
					//document.getElementById('date').innerHTML = format(dateHtml, [ p((now.getMonth()+1)), p(now.getDate()), week.charAt(now.getDay())]);
				}				
				
				window.yungou_time = 	function(time){						
					showTime(time);
					timer = setInterval(function(){
						time += 1000;
						showTime(time);
					}, 1000);					
				}
	window.yungou_time(1472006516*1000);
				
})();
				
				
				
$(document).ready(function(){
	try{  
       if(typeof(eval(pleasereg_initx))=="function"){
            pleasereg_initx();
	   }
    }catch(e){
       //alert("not function"); 
    }  
})
</script>
<!--
<script>

$(function(){

	//组团夺宝基金
	$.ajax({
		url:"http://lyz.***.com/?/api/fund/get",
		success:function(msg){
		var str='<i class="rmbf">￥</i>'+msg;
			$("#spanFundTotal").html(str);
		}
	});
function getCount(){
		$.get("http://lyz.***.com/?/member/cart/getnumber/"+ new Date().getTime(),function(data){
			$("#sCartTotal").text(data);											
			$("#btnMyCart em").text(data);
			$('.head_cart span').text(data);								
		});
}
getCount();
setInterval(function(){
	getCount();
},2000);
</script>
-->
</block>